preserve
keep if year==1998| year==2014
gen fpi_global_south=fpi if global_south==1
gen fpi_global_north=fpi if global_south==0

***********
***world***
***********
ttest fpi, by(year)

*diff
*.05640

*se
* .0176

******************
***global south***
******************

ttest fpi_global_south, by(year)

*diff
*.0860

*se
*.02357

******************
***global north***
******************

ttest fpi_global_north, by(year)

*diff
*.00717

*se
*.02084

clear all
cd C:\(the directory where you saved the files)
use fig4.dta

serrbar diff se group_code, scale (1.96) yline(0)  title("95% Confidence Interval for Mean FPI Change")  sub("Between 1998 and 2014") yline(0) yline(0) b2(Group of countries) t1(95% Confidence Interval for Mean FPI Change) l1(FPI Change (units)) ylab(-.05(.05).1) xlab(1(1)3) xlabel(, valuelabel) scheme(s1mono) 
 

